package com.chenl.provider.DEMOS.Spring.注解的使用.ConfigurationProperties注解;

import lombok.Data;
import org.springframework.boot.context.properties.ConfigurationProperties;
import org.springframework.boot.context.properties.EnableConfigurationProperties;

@Data
//相当于直接把当前实体配置到IOC容器中，根据的是配置文件以anno开头的属性进行配置，如anno.name
@ConfigurationProperties(prefix = "anno")
//启动类要加@ConfigurationPropertiesScan或者在任意其他类上使用@EnableConfigurationProperties(value = {AnnoTestBean.class})
public class AnnoTestBean {
    private String name;
    private String age;
    private String phone;
}
